let arr: (number | string)[] = [1, 2, 'a', 'b']

// type   关键字

// 基础
// 类型别名: type 类型别名 = 具体类型

// type 首字母大写
type CustorArr = (number | string | boolean)[]

let arr2: CustorArr = [1, 2, 'a', 'b', true]

console.log(arr)
console.log(arr2)

// 类型别名 复用

type TypeArr = (number | string)[]

const arr3: TypeArr = [1, 2, 'aa', 'bb']

const arr4: TypeArr = ['cxk', 'rap', 26]

console.log(arr3)

console.log(arr4)
